public class Student2 implements Comparable{
    private String name;
    private int score;

    public Student2(String name, int score) {
        this.name = name;
        this.score = score;
    }


    @Override
    public String toString(){
        return "{"+this.name+":"+this.score+"}";
    }

    @Override
    public int compareTo(Object o){
        Student2 s = (Student2) o;
        if (this.score>s.score){
            return -1;
        }else if(this.score<s.score){
            return 1;
        }
        return 0;
    }



}
